x86/hvm: refine the judgment on IDENT_PT for EMT
authorDongxiao Xu <dongxiao.xu@intel.com>
Mon, 10 Mar 2014 10:02:25 +0000 (11:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 10 Mar 2014 10:02:25 +0000 (11:02 +0100)
commitcadfd7bca999c0a795dc27be72d43c92e8943a0b
treed9e1583f4fcf10292e72020a145437296920b4dd
parent4888ac5891f3daa37bdb3059893db084b50f497b
x86/hvm: refine the judgment on IDENT_PT for EMT

When trying to get the EPT EMT type, the judgment on
HVM_PARAM_IDENT_PT is not correct which always returns WB type if
the parameter is not set. Remove the related code.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
We can't fully drop the dependency yet, but we should certainly avoid
overriding cases already properly handled. The reason for this is that
the guest setting up its MTRRs happens _after_ the EPT tables got
already constructed, and no code is in place to propagate this to the
EPT code. Without this check we're forcing the guest to run with all of
its memory uncachable until something happens to re-write every single
EPT entry. But of course this has to be just a temporary solution.

In the same spirit we should defer the "very early" (when the guest is
still being constructed and has no vCPU yet) override to the last
possible point.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/mtrr.c